import { defHttp } from '/@/utils/http/axios';
const baseAPi = '/Device/';
/**
 * @description: 同步Mes数据
 */
export function updateequipments() {
  return defHttp.post({ url: `${baseAPi}syncequipmentdata` });
}

/**
 * @description: 清空
 */
export function clearequipment() {
  return defHttp.post({ url: `${baseAPi}clearequipment` });
}

/**
 * @description: 添加
 */
export function addequipment(data) {
  return defHttp.post({ url: `${baseAPi}addequipment`, data });
}
/**
 * @description: 批量删除
 */
export function batchdeleteequipment(data) {
  return defHttp.post({ url: `${baseAPi}batchdeleteequipment`, data });
}
/**
 * @description: 编辑
 */
export function updateequipment(data) {
  return defHttp.post({ url: `${baseAPi}updateequipment`, data });
}
/**
 * @description: 删除
 */
export function removeequipment(data) {
  return defHttp.post({ url: `${baseAPi}removeequipment`, data });
}
/**
 * @description: 获取设备集合
 */
export function getequipments(data) {
  return defHttp.post({ url: `${baseAPi}getequipments`, data });
}
/**
 * @description: 根据企业模型获取设备集合
 */
// export function getequipmentsbyenterprise(data) {
//   return defHttp.post({ url: `${baseAPi}getequipmentsbyenterprise`, data });
// }
export function getequipmentsbyenterprise(data) {
  return defHttp.post({ url: `${baseAPi}getequipmentspage`, data });
}
/**
 * @description: 获取运行时驱动树-仅显示驱动
 */
export function getruntimeonlydriver() {
  return defHttp.post({ url: `${baseAPi}getruntimeonlydriver` });
}
/**
 * @description: 获取工序
 */
export function getequipmentsprocess() {
  return defHttp.post({ url: `${baseAPi}getequipmentsprocess` });
}
/**
 * @description: 工序的设备列表
 */
export function getequipmentsprocesscollection(data) {
  return defHttp.post({ url: `${baseAPi}getequipmentsprocesscollection`, data });
}
/**
 * @description: 上传图片
 */
export function uploadimg(data) {
  return defHttp.post({ url: `${baseAPi}uploadimg`, data });
}
/**
 * @description: 获取设备状态
 */
export function getequipmentstate(data) {
  return defHttp.post({ url: `${baseAPi}getequipmentstate`, data });
}
/**
 * @description: 获取设备历史状态
 */
export function getequipmenthistorystate(data) {
  return defHttp.post({ url: `${baseAPi}getequipmenthistorystate`, data });
}
/**
 * @description: 获取设备卡片
 */
export function getequipmentcard(data) {
  return defHttp.post({ url: `${baseAPi}getequipmentcard`, data });
}
/**
 * @description: 获取设备关联的企业模型
 */
export function getdeviceenterprise(data) {
  return defHttp.post({ url: `${baseAPi}getdeviceenterprise`, data });
}
/**
 * @description: 获取配置文件Tags
 */
export function getruntimetaginfobydriverid(data) {
  return defHttp.post({ url: `${baseAPi}getruntimetaginfobydriverid`, data });
}
/**
 * @description: 获取类型参数
 */
export function getpropertybyclass(data) {
  return defHttp.post({ url: `${baseAPi}getpropertybyclass`, data });
}
